A processor typically contains a timing component, such as a clock, for providing a reference clock signal that sets the timing of operations for the components of the processor. Each component operation can be clocked in such a way so as to provide synchronization with all the other components of the processor.
A significant portion of the total power consumption of a processor, however, is the power required to distribute the primary clock signal throughout the processor. Power consumption therefore becomes an issue that cannot be ignored, especially for hand-held electronic devices in which processors are powered by a battery. Since a processor's clock typically consumes a relatively large amount of battery power, it is well known to design electronic devices such that the clock can be temporarily shut off during extended periods of inactivity. Since a processor often operates on non-critical instructions, such as “loop to self” instructions, it is beneficial to design processors with a mechanism for shutting off the clock to avoid unnecessary processor usage and power consumption during these non-critical times.
To shut off the clock, processors may include logic circuitry to “gate” the system clock. A system clock is gated when the periodic pulse of the clock is routed through a “clock gating circuit” that is capable of outputting either the regular clock pulses or a constant value. Because the power required to provide a constant logic value throughout the processor is less than the power required to provide the periodic clock pulse, the power consumption of the processor can be reduced.
To characterize a clock gating circuit for reducing power consumption, processor designers are typically required to create custom clock gating circuits for particular processor applications. For example, a custom clock gating circuit may be used to gate the system clock leading to large modules such as registers files. The tasks involved in creating these custom circuits can be quite time consuming, and how to integrate these circuits into the processor is a concern that must also be addressed. Even with conventional design techniques, clock gating circuits often do not meet stringent design specifications.
FIG. 1 illustrates a conventional processing system 10 of an electronic device, such as a battery-operated hand-held device. The processing system 10 includes power management logic 12, a processor 14, memory 16, and input/output devices 18, each interconnected via an internal bus 20. The processor 14 includes a clock 22 for driving the electrical circuitry as is well known. The memory 16 may include a memory controller and other hardware and/or software elements. The input/output devices 18 may include keyboards, keypads, display screens, etc. Since one of ordinary skill in the art will understand the general operations and functions of the memory 16 and input/output devices 18, these components will not be further described in this disclosure.
The power management logic 12 may include hardware and/or software elements for determining specific circuit conditions that might be ideal times when automatic power-saving measures can be taken. For example, the power management logic 12 may monitor when the processor has not been working on any critical instructions for a predetermined length of time or it may monitor periods of user inactivity or other specific circuit conditions. In these situations, the power management logic 12 can request that the processor 14 disable its clock 22. Later, when a wake-up event occurs, the power management logic 12 can re-enable the clock 22.
FIG. 2 is a schematic diagram of a conventional clock gating circuit 24. The clock gating circuit 24 includes a D-type flip-flop 26 and an AND gate 28. The clock enable signal E is provided to the D input of the flip-flop 26 for enabling or disabling the clock signal CK, which is received from a clock source (not shown). The CK signal is supplied to the G input of the flip-flop 26 and to an input of the AND gate 28. The Q output from the flip-flop 26 is provided to the other input of the AND gate 28. When E and CK are both active, the AND gate supplies the effective clock signal ECK that is distributed to a clock-gated module (not shown). The clock-gated module may, for example, be a multi-port register file. When the power management logic 12 determines that the clock-gated module does not require a high power-consuming clock signal, then the clock gating circuit 24 can provide a constant low signal at the output ECK to save power.
However, the conventional clock gating circuit has several drawbacks. For instance, the E and CK signals will be in a race condition in which the first signal supplied to the respective input of the AND gate will have to wait until the other signal arrives. If the latched output Q comes later than CK, then the output ECK will be driven by the enable signal E and not by CK, which can result in a clock skew problem. To allow enough time to provide the Q output before CK, the setup time of E with respect to CK has to increase, thereby making the design process more complex. Also, this high setup time increases the delay of the circuit, thereby slowing the operation of the processor.
Another drawback is that the AND gate 28 is typically large in order to drive a number of loads. For this reason, the input capacitance of CK will become large as the size of the AND gate 28 is increased. To avoid the large input capacitance, buffers are needed either in front of the input CK or at the output ECK, thereby requiring more time to the custom design the circuit. Also, these buffers, added to the design of the clock gating circuit 24, will introduce a delay between the CK and the ECK terminals, which results in additional clock skew and may also result in an increase in the setup time for E.
Although a custom circuit can be designed and built around a clock gating cell to meet processor specifications, creating such a complex custom circuit is difficult to do and requires much time and effort to design, implement, characterize, and integrate. Thus, it would be desirable to provide an improved design and design strategy that would be less complex than that required for the conventional clock gating circuit 24. Also, a less complex circuit would allow designers to more quickly prepare the processor for market. In addition, it would be desirable to create a less complex circuit that also provides better timing specifications, minimizes the delay, maintains a high processing speed, and consumes a small amount of power.